package com.ncpowernode.service.impl;

import com.ncpowernode.mapper.ItemMapper;
import com.ncpowernode.pojo.Item;
import com.ncpowernode.service.ItemService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ItemServiceImpl implements ItemService {

    @Resource
    private ItemMapper itemMapper;

    @Override
    @Transactional
    public void save(Item item) {
        itemMapper.save(item);
    }

    @Override
    public List<Item> findAll(Item item) {
        return itemMapper.selectAll(item);
    }
}
